package com.zy.mybatisdemo.controller;

import com.zy.mybatisdemo.common.model.User;
import com.zy.mybatisdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Auther: zhangy
 * @Date: 2018/10/3 22:23
 * @Description:
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;
    @GetMapping(value = "list")
    public List<User> getUsers(){
        return userService.getUsers();
    }
}
